package common.impl;

import java.sql.Timestamp;

import net.sf.json.JSONObject;

public class DateHandle {
	
	public static JSONObject timeGetDate(Timestamp time) {
		JSONObject obj = new JSONObject();
		String date = time.toString();
		obj.put("year", date.substring(0,4));
		obj.put("month", date.substring(5,7));
		obj.put("day", date.substring(8,10));
		obj.put("hour", date.substring(11,13));
		obj.put("minute", date.substring(14,16));
		obj.put("second", date.substring(17, 19));
		
		return obj;
	}
}
